function joke() {
  let xhr = new XMLHttpRequest();
  xhr.open("get", "https://autumnfish.cn/api/joke");
  xhr.onload = function () {
    let resHtml = xhr.response;
    document.querySelector("p").innerHTML = resHtml;
  };
  xhr.send();
}
joke();
document.querySelector("#btn").onclick = function () {
    document.querySelector("p").innerHTML = '加载中...';
    joke();
};
